All Questions
11 questions
2votes
3answers
234views
Java Clean Code, use of enums in data structure
I have defined a data structure in Java that allows to manage certain type of elements like a Queue, with the special feature of using 2 inner rows (windows) to attend elements: ...
2votes
1answer
89views
Defining a finite set of instances of a class to check against [closed]
I have a Type class that will have many instances. I get the instances from a web service. The Type class has a ...
2votes
1answer
75views
Two ways to implement DND type abilities
I am creating a game in Java that uses the DND model for a lot of its components. I've hit a roadblock when it comes to creating and implementing abilities. I have ...
1vote
2answers
93views
Advanced nuclides library
[Context] : I'm currently developing a program in nuclear physics and i would like to have a simple access to all nuclides. Technical specifications are : Since informations are static, I want them ...
0votes
4answers
11kviews
Enumeration for days of the week
I want to be able to represent days of the week as Strings and numerical values so I can print out the days of the week and sort them properly (sun-sat instead of sorting them alphabetically). This is ...
1vote
1answer
88views
Improving Design for structured Keys
On several occasions I had to use a fixed set of keys (constants in the sense of static final String) with some additional logic (grouping in different keySets). After some more or less lefthanded ...
4votes
1answer
150views
Test and implementation of a reorderable data structure that stores number of users (classifiable as per gender, country, etc.) of an Application
I have implemented a data structure that allows storage of number of users of a hypothetical application in a tree-like data structure in nodes as per their classification based on categories such as ...
7votes
1answer
4kviews
The Yahtzee Game
I am designing two methods to be used in a Java implementation of Yahtzee. For those not familiar with the game: Players take turns rolling dice and acquire points based on the face up values of ...
6votes
3answers
584views
Enum Constants for Convert Units
I have a few constants in a game that I'm doing for hobby. I need to store constants for the total size of the a Physical World and the size of the Screen. I can position the world's objects to the ...
3votes
3answers
113views
Device-dependent image descriptor fields
In a Java class that belongs in a library, I have a field size that indicates size of image. It must be int, but some values are ...
7votes
4answers
3kviews
Tic-Tac-Toe design
Kindly look at this code and point out design flaws or areas for improvement. I think I've done the last part right (the enum). I think the rest of the design is flawed but I am very new to object-...